/*Yipeng Huang and Scott Rogowski*/
/*yh2315 smr2167*/

//Very simple and elegant multiplexer.  Take the selector bits, decode them, perform a bitwise & with the input bits which will leave only one wire with a possible '1', and or all of the wires together to get the result.

module TwoToOneMultiplexer (mux_in_0, mux_in_1, selector, mux_out);

	parameter WIDTH = 32; // default value

	input [WIDTH-1:0] mux_in_0;
	input [WIDTH-1:0] mux_in_1;
	input selector;

	output [WIDTH-1:0] mux_out;
	
	assign mux_out = (selector) ? mux_in_1 : mux_in_0; 

endmodule
